using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data {
    public partial class PayInfoMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<PayInfo> {
        public PayInfoMap() {
            // table
            ToTable("mc_PayInfo", "dbo");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.OrderNo)
                .HasColumnName("OrderNo")
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.PayType)
                .HasColumnName("PayType")
                .IsRequired();
            Property(t => t.PayCode)
                .HasColumnName("PayCode")
                .HasMaxLength(20)
                .IsRequired();
            Property(t => t.PayName)
                .HasColumnName("PayName")
                .HasMaxLength(20)
                .IsOptional();
            Property(t => t.PayNo)
                .HasColumnName("PayNo")
                .HasMaxLength(50)
                .IsRequired();
            Property(t => t.TransactionNo)
                .HasColumnName("TransactionNo")
                .HasMaxLength(50)
                .IsOptional();
            Property(t => t.CreateTime)
                .HasColumnName("CreateTime")
                .IsRequired();
            Property(t => t.PayTime)
                .HasColumnName("PayTime")
                .IsOptional();
            Property(t => t.BoardId)
                .HasColumnName("BoardId")
                .IsOptional();
            Property(t => t.PlateId)
                .HasColumnName("PlateId")
                .IsOptional();

            // Relationships
        }
    }
}
